Belief Propagation-Based Cognitive Routing in Maritime Ad Hoc Networks